<script setup>
import { ref } from "vue";
import VChart from 'vue-echarts';
import * as echarts from 'echarts'
// import { use } from 'echarts/core';
import { BarChart } from 'echarts/charts';
import { DataZoomComponent } from 'echarts/components';
import { Card, Form, FormItem, Input } from 'element-ui'

// use([BarChart, DataZoomComponent]);

const _option = ref({
  xAxis: {
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [120, 200, 150, 80, 70, 110, 130],
      colorBy: 'data',
      markPoint: {
        data: [
          { type: 'max' },
          { type: 'min' },
        ]
      },
      markLine: {
        itemStyle: {
          type: 'dashed',
        },
        data: [[{ type: 'min' }, { type: 'max' }]]
      },
      type: 'bar'
    }
  ]
})
const text = ref('')

</script>
<template>
  <div>
    <div class="echarts">
      <VChart :option="_option" />
    </div>

    <Card>
      <Form>
        <FormItem label="信息">
          <Input v-model="text" />
        </FormItem>
      </Form>
    </Card>
  </div>
</template>
<style scoped>
.echarts {
  width: 300px;
  height: 300px;
}
</style>
